package Experiment.house.room1;

public class Person {
    public int leg=2;
    int age;
    private double money;

    public Person(int age, double money) {
        this.age = age;
        this.money = money;
    }
    public void saveMoney(double money){
        this.money=this.money+money;
    }
    public double getMoney(){
        return  this.money;
    }

    public int getAge() {
        return this.age;
    }
    public void openSafe(Safe safe){
        System.out.println(safe.money);
    }
}
